/*
 * P125
 */

#include <iostream>

using namespace std;

class Year
{
	int y;
	const int InitY;

public:
	Year(int initY):InitY(initY)
	{
		y = InitY;
	}
	int year() const
	{
		return y;
	}
	void add_year(int i)
	{
		y = year() + i;
	}
};

int main()
{
	Year y1(1);
	Year* const py1 = new Year(0);

	y1.add_year(1);
	py1->add_year(2);

	cout<<y1.year()<<','<<py1->year()<<endl;

	return 0;
}
